x86/hvm: add nospec to hvmop param
authorNorbert Manthey <nmanthey@amazon.de>
Thu, 14 Mar 2019 12:56:00 +0000 (13:56 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 5 Apr 2019 10:18:34 +0000 (12:18 +0200)
commit93dfd72bdb43b35dbb1424c476d17aac67e82837
treed56af3982245d81e28d7bbfcfc766c2b553bbb27
parentdfdf4780487aeb3e983a1a23d5114246e55e8168
x86/hvm: add nospec to hvmop param

The params array in hvm can be accessed with get and set functions.
As the index is guest controlled, make sure no out-of-bound accesses
can be performed.

As we cannot influence how future compilers might modify the
instructions that enforce the bounds, we furthermore block speculation,
so that the update is visible in the architectural state.

This is part of the speculative hardening effort.

Signed-off-by: Norbert Manthey <nmanthey@amazon.de>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/hvm/hvm.c